{% extends 'movie/new_base.html' %}

{% block content %}
    <style>
    iframe{
    position: absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    z-index: -1;
    }
        .poster {
            float: left;
            margin: 3px 12px 0 0;
            overflow: hidden;
            text-align: center;
        }

        .info {
            max-width: 800px;
            margin-top: 15px;
            float: left;
            word-wrap: break-word;
            overflow: hidden;
        }

        hr {
            -moz-border-bottom-colors: none;
            -moz-border-image: none;
            -moz-border-left-colors: none;
            -moz-border-right-colors: none;
            -moz-border-top-colors: none;
            border-color: #ffffff;
            border-style: solid none;
            border-width: 1px 0;
            margin: 18px 0;
        }
    </style>
    <div class="container">
        {% for message in messages %}
            {% if message.tags == 'info' %}
                <div class="alert alert-success" role="alert">{{ message }}</div>
            {% endif %}
        {% endfor %}
        <div class="alert alert-info" role="alert">根据你的评分历史推荐出来的电影</div>
    </div>

    {% for movie in movies %}

        <div class="container">
{#            <div class="movie">#}
                <div class="poster">
                    <a href="{% url 'movie:detail' movie.pk %}" class="item">
                        <div class="poster_div">
                            <img src="/static/movie/img/{{ movie.imdb_id }}.jpg" alt="">
                        </div>
                    </a>
                </div>

                        <div class="info">
                <p style="font-size: 20px; color: #ffffff;">
                    电影名：{{ movie.name }}
                    <span>
                        {% for foo in movie.get_score_int_range %}
                            ★
                        {% endfor %}
                    </span>
                    <strong>{{ movie.get_score }}</strong>
                </p>
{#                <p style="font-size: 20px; color: #ffffff;">简介：{{ movie.intro }}</p>#}
                <p style="font-size: 20px; color: #ffffff;">导演：{{ movie.director }}</p>
                <p style="font-size: 20px; color: #ffffff;">国家：{{ movie.writers }}</p>
                <p style="font-size: 20px; color: #ffffff;">主演：{{ movie.actors }}</p>
                <p style="font-size: 20px; color: #ffffff;">
                    类型：
                    {% for genre in movie.get_genre %}
                        <a href="{% url 'movie:tag' %}?genre={{ genre }}" style="color: #ffffff;">{{ genre }}</a>
                        {% if not forloop.last %}
                            <span style="color: #ffffff;">|</span>
                        {% endif %}
                    {% endfor %}
                </p>
                {# <p style="font-size: 20px; color: #ffffff;">时长：{{ movie.time }}</p> #}
                <p style="font-size: 20px; color: #ffffff;">发行时间：{{ movie.release_time }}</p>
            </div>
{#            </div>#}
        </div>
        <div class="container">
        <hr>
        </div>

    {% endfor %}
{% endblock %}